<template>
	<view>
		<!-- <button @click="go">点此返回到index</button> -->
		<button @click="change(1)">切换title为1</button>
		<button @click="change(2)">切换title为2</button>
		title的值为{{title}}
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 1
			}
		},
		methods: {
			// go(){
			// 	uni.navigateBack({
			// 		delta: 1
			// 	})
			// },
			change(v){
				this.title = v;
				uni.$emit('watchIndex1', this.title)
				uni.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>

<style>

</style>
